package phototour3.client;


public class Area{
	
	private Double centralPhotoLatitude;
	
	private Double centralPhotoLongitude;
	
	private Integer photoNumber;
	
	//This point is the most popular point in the area 
	private Photo theMostPopularPhoto;

	
	public Area(Double photoLatitude,Double photoLongitude){
		centralPhotoLatitude=photoLatitude;
		centralPhotoLongitude=photoLongitude;
		photoNumber=1;

	}
	public Area(Double photoLatitude,Double photoLongitude,Photo theMostPopularPhoto){
		centralPhotoLatitude=photoLatitude;
		centralPhotoLongitude=photoLongitude;
		photoNumber=1;
		this.theMostPopularPhoto=theMostPopularPhoto;
	}
	
	public Photo getTheMostPopularPhoto() {
		return theMostPopularPhoto;
	}
	public void setTheMostPopularPhoto(Photo theMostPopularPhoto) {
		this.theMostPopularPhoto = theMostPopularPhoto;
	}
	
	public Double getCentralPhotoLatitude() {
		return centralPhotoLatitude;
	}
	
	public void setCentralPhotoLatitude(Double centralPhotoLatitude) {
		this.centralPhotoLatitude = centralPhotoLatitude;
	}
	
	public Double getCentralPhotoLongitude() {
		return centralPhotoLongitude;
	}

	public void setCentralPhotoLongitude(Double centralPhotoLongitude) {
		this.centralPhotoLongitude = centralPhotoLongitude;
	}

	public Integer getPhotoNumber() {
		return photoNumber;
	}
	

	public void setPhotoNumber(Integer photoNumber) {
		this.photoNumber = photoNumber;
	}
	
	public Double calculateLatMax(){
		return (centralPhotoLatitude + 0.001);
	}
	
	public Double calculateLatMin(){
		return (centralPhotoLatitude - 0.001);
	}
	
	public Double calculateLongMax(){
		return (centralPhotoLongitude + 0.001);
	}
	
	public Double calculateLongMin(){
		return (centralPhotoLongitude - 0.001);
	}



}
